var pic = "http://p0.meituan.net/deal/ce27d7b711b5991fdfd78b820e35b557288464.png";
var v = new Vue({
    el: "#buyCar",
    data: {
        shopArr: [
            { pic, name: "秋刀鱼/斤", price: 35, count: 1 },
            { pic, name: "鲜大带鱼/条", price: 45, count: 1 },
            { pic, name: "鲜活全母皮皮虾/斤", price: 85, count: 1 },
            { pic, name: "13-15头鲍鱼/只", price: 105, count: 1 }
        ]
    },
    methods: {
        add(item) {
            if (item.count < 5) {
                item.count++;
            }
        },
        sub(item) {
            if (item.count > 1) {
                item.count--;
            }
        },
        clean() {
            this.shopArr = [];
        }
    }
})